package com.hq.fxh.No1_Infromation.Video.Adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hq.fxh.R;
import com.hq.fxh.Utils.LogUtils;

import java.util.ArrayList;

/**
 * /**
 *
 * @author 薛
 * @ClassName
 * @Description :
 * @Created 2017/8/15
 * @Email xlwenhao1858@sina.com
 */


public class Help_VideoDetils_Content {
    protected View rootView;
    protected TextView tvVideoDatilTitle;
    protected TextView tvVideoDatilContent;
    protected TextView tvVideoDatilReadNum;
    protected LinearLayout tvVideoDatilZhan;
    protected TextView tvVideoDatilZhiRu;
    Context context;
    ArrayList<String> datas;

    public Help_VideoDetils_Content(Context context, ArrayList<String> datas) {
        this.context = context;
        this.datas = datas;

    }


    public void doIt() {
        tvVideoDatilContent.setText("社会上还是地方宽带连接氨基酸覅偶");
        tvVideoDatilReadNum.setText("1432人阅读");
        tvVideoDatilTitle.setText("标题");
        tvVideoDatilZhan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                LogUtils.e("视频详情点赞");
            }
        });
        tvVideoDatilZhiRu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                LogUtils.e("植入广告点击事件");
            }
        });
    }


    public View getView() {
        View inflate = LayoutInflater.from(context).inflate(R.layout.videodetail_play_item, null);
        initView(inflate);
        doIt();
        return inflate;
    }

    private void initView(View rootView) {
        tvVideoDatilTitle = (TextView) rootView.findViewById(R.id.tv_VideoDatil_Title);
        tvVideoDatilContent = (TextView) rootView.findViewById(R.id.tv_VideoDatil_Content);
        tvVideoDatilReadNum = (TextView) rootView.findViewById(R.id.tv_VideoDatil_ReadNum);
        tvVideoDatilZhan = (LinearLayout) rootView.findViewById(R.id.tv_VideoDatil_Zhan);
        tvVideoDatilZhiRu = (TextView) rootView.findViewById(R.id.tv_VideoDatil_ZhiRu);
    }
}
